<!DOCTYPE html>
<html xmlns:th = "http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	 h3{
	 	text-align: center ;
	 }
	 
	 table{
	 	font-size:10px;
	 	width:300px;
	 	
	 	margin:0 auto ;
	 }
	 
</style>
</head>
<body>
	<h3>修改雇员信息</h3>
	
	<form th:action="@{/employee/modify}" method = "post">
	     <input type = "hidden" name = "_method" value="put">
		<table>
		  <tr>
		  	   <td><input type = "hidden" name = "id" th:value = "${emp.id}"></td>
		  	   <td><input type = "hidden" name = "id" th:value = "${emp.dept.deptId}"></td>
		  </tr>
		   <tr>
		  	   <td align = "right">姓名：</td>
		  	   <td><input name = "empName" th:value = "${emp.empName}"></td>
		  </tr>
		   <tr>
		  	   <td align = "right">电话：</td>
		  	   <td><input name = "phone"  th:value = "${emp.phone}"></td>
		  </tr>
		   <tr>
		  	   <td align = "right">地址：</td>
		  	   <td><input name = "address"  th:value = "${emp.address}"></td>
		  </tr>
		   <tr>
		  	   <td align = "right">生日：</td>
		  	   <td><input name = "birthday"  th:value = "${#dates.format(emp.birthday,'yyyy-MM-dd')}"></td>
		  </tr>
		   <tr>
		  	   <td align = "right">部门：</td>
		  	   <td>
		  	   		<select name = "dept.deptId">
		  	   			<option th:each = "d : ${depts}" th:value = "${d.deptId}" th:text = "${d.deptName}"
								th:selected="${d.deptId==emp.dept.deptId}"
						></option>
		  	   		</select>
		  	   </td>
		  </tr>
		   <tr>
		  	   <td colspan="2" align = "center"><input type= "submit" value = "修改"></td>
		  </tr>
		  
		</table>
	</form>
</body>
</html>